<script setup>
import { reactive, ref, toRefs } from 'vue'
const obj=reactive({message:'torefs的值',num:'1'})
let {message}=toRefs(obj)
let {num}=toRefs(obj)
setTimeout(()=>{
   
    message.value = '响应式数据绑定torefs的值' 
   
},2000)
</script>

<template>
    <!-- 响应式对象或数组 -->
 <div>
  <h1>message的值:{{message}}+{{ num }}</h1>
  <h2>obj.message的值:{{obj.message}}</h2>
 </div>
</template>

<style scoped>
h1{color: blue;}
h2{
    color: aquamarine;
}
.read-the-docs {
  color: #888;
}
</style>
